' Test ai mod 2-28 Last Test in SB to translate to SB1
' Test ai Last Test... 2-27
' SB test originally done 2018-09-15

' The main test here is testing if Split converts SB's array string to SB1's array string using Split.
' You don't have to Set to Get, Split sets up an Astring from a literal "data" string.
' That's the point of this exercise, but we show alternate ways to get a space in a variable and
' more talk about handling empty strings from ? Enters for Input statements.

' This rewrite is testing MT constant "" to compare 

' SB's space delimited list of months, SB only worked with Space delimited Astrings.
months "January February March April May June July August September October November December

' Set up our Split delimiter for SB1 that can Split any delimited string into something 
' like an array, an Astring.

' Try this because it tests a new String Function:
sp1 chr 32
' Make months an Astring for Get, with space generated from Chr function.
12Months split months, sp1
'Yes! works, probably most sensible way? Really leery about using literals in String Functions.

'OK now try a Get
'get Jan, 12Months, 1
' That's fine but now try SFunction:  var get Astring, inx  2/28 test
Jan get 12Months, 1

. (Hopefully) January should end this line for month 1 of 12 > ;Jan
.
. I can name the month with just it's number:

' 2/28 try new n? or ?n doesn' matter if n comes before or after the ?
[
	?n (0 quits) Enter month number to name; nMonth
	' now I can skip all the isEmpty business
	if nMonth = 0 
		exit	
	el
		' this WAS working with next line expression in IF but works var = expression as it should
		' IF really does not do evaluations only var = numeric expression
		TF = (( nMonth > 0) and ( nMonth < 13))
		if TF
			month get 12months, nMonth
			. The ;nMonth ;th month is ;month
		el
			. Sorry, the month range is 1 to 12. Try again.
		fi
		.
	fi
]